-
Notifications
You must be signed in to change notification settings - Fork 186
Add the referencetarget feature #3376
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There are a few open issues that still need to be worked through, tracked from WICG/webcomponents#1086. |
@@ -0,0 +1,8 @@ | |||
name: Reference target | |||
description: The `referenceTarget` property of a `ShadowRoot` object forwards attributes such as `for` and `aria-labelledby` to elements inside a shadow DOM. This allows, for example, to link a `<label>` to its `<input>` even if the `<input>` is in the shadow DOM of a web component. | |||
spec: https://github.com/WICG/webcomponents/blob/gh-pages/proposals/reference-target-explainer.md |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if it's customary to link in-progress spec PRs for features in development, but if those are allowed here then these are the best spec links for the feature for now:
whatwg/html#10995
whatwg/dom#1353
Co-authored-by: Daniel D. Beck <[email protected]>
Co-authored-by: Daniel D. Beck <[email protected]>
TODO: add predicted BCD keys. |
Fixes #2309.
This is a pretty pivotal feature for web components, as it allows to correctly map IDREF attributes to things inside the shadow DOM, without breaking encapsulation.
It's apparently been through an origin trial in Chromium, but I'm not sure what the plans are when it comes to shipping.
@dandclark can you share any plans on the above?
It's been proposed for Interop 26: web-platform-tests/interop#1011